﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace AutoTestCommunication_Service
{
    public class ConnectInfo
    {
        private string remoteIP;
        /// <summary>
        /// C2000IP地址
        /// </summary>
        public string RemoteIP
        {
            get { return remoteIP; }
            set { remoteIP = value; }
        }

        private int remotePort;
        /// <summary>
        /// C2000端口号
        /// </summary>
        public int RemotePort
        {
            get { return remotePort; }
            set { remotePort = value; }
        }

        private int connectID;
        /// <summary>
        /// 连接号
        /// </summary>
        public int ConnectID
        {
            get { return connectID; }
            set { connectID = value; }
        }

        private string mac;
        /// <summary>
        /// MAC地址
        /// </summary>
        public string Mac
        {
            get { return mac; }
            set { mac = value; }
        }

        private short com;
        /// <summary>
        /// 串口编号
        /// </summary>
        public short Com
        {
            get { return com; }
            set { com = value; }
        }

        private int modelId;
        /// <summary>
        /// 设备型号ID
        /// </summary>
        public int ModelId
        {
            get { return modelId; }
            set { modelId = value; }
        }

        private string deviceType;
        /// <summary>
        /// 设备型号
        /// </summary>
        public string DeviceType
        {
            get { return deviceType; }
            set { deviceType = value; }
        }

        private TcpClient client;
        /// <summary>
        /// 设备socket
        /// </summary>
        public TcpClient Client
        {
            get { return client; }
            set { client = value; }
        }

        private string readmode;
        /// <summary>
        /// 设备读取方式
        /// </summary>
        public string ReadMode
        {
            get { return readmode; }
            set { readmode = value; }
        }
        private IPEndPoint endPoint;
        public IPEndPoint EndPoint
        {
            get { return endPoint; }
            set { endPoint = value; }
        }

        private byte[] getbyteDI;
        /// <summary>
        /// 设备型号
        /// </summary>
        public byte[] GetbyteDI
        {
            get { return getbyteDI; }
            set { getbyteDI = value; }
        }
        private byte[] getbyteAI;
        /// <summary>
        /// 设备型号
        /// </summary>
        public byte[] GetbyteAI
        {
            get { return getbyteAI; }
            set { getbyteAI = value; }
        }
        private string tcpNumber;
        /// <summary>
        /// TCP号
        /// </summary>
        public string TcpNumber
        {
            get { return tcpNumber; }
            set { tcpNumber = value; }
        }

        private byte[] buff;
        /// <summary>
        /// 缓存
        /// </summary>
        public byte[] Buff
        {
            get { return buff; }
            set { buff = value; }
        }

        public string CommandType { get; set; }
    }

}
